<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class finalcheck extends CI_Controller 
	{
			public function worklist()
			{
			echo  $this->finalcheck_model->getWorklist();
			}
			public function newDataFinalCheck()
			{
			 	$inputData = array(
					"form_id"=>"4",
					"order"=>$this->input->post("finalcheckFC2"),
					"order_no"=>$this->input->post("finalcheckFC3"),
					"total_pallet"=>$this->input->post("finalcheckFC4"),
					"customer"=>$this->input->post("finalcheckFC5"),
					"product"=>$this->input->post("finalcheckFC6"),
					"numbercar"=>$this->input->post("finalcheckFC7"),
					"grade"=>$this->input->post("finalcheckFC8"),
					"modify_user"=> '10001',
					"status"=> '1'
				);
			 	$text = "";
			 	$inputAllData=array();
			 	for($i=10;$i<=16;$i++){
				$data= array();
				$data = array(
			 	"data_name"=> "finalcheckFC".$i,
			 	"value_start"=> $this->input->post("finalcheckFC".$i."_1"),
			 	"value_end"=> $this->input->post("finalcheckFC".$i."_2")
			 	);
			 	$inputAllData[]=$data;
			 	}
				//print_r ($inputAllData);
				echo $this->finalcheck_model->checkMasterReel($inputData,$inputAllData);

			}
	}
